package com.lin.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.lin.mapper.PsmanageMapper;
import com.lin.pojo.MApply;
import com.lin.pojo.PageVo;
import com.lin.service.PsmanageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;


@Service
public class PsmanageServiceImpl extends ServiceImpl<PsmanageMapper,MApply> implements PsmanageService {
    @Autowired
    PsmanageMapper psmanageMapper;

    @Override
    public PageVo<MApply> queryMApplybycond(MApply mApply, int pageno, int pagesize) {
        PageHelper.startPage(pageno,pagesize);
        //连表条件查询
        List<MApply> list= psmanageMapper.queryMApplybycond(mApply);
        PageInfo<MApply> page1=new PageInfo<MApply>(list);
        PageVo<MApply> pageVo = new PageVo<MApply>();
        pageVo.setTotal(page1.getTotal());
        pageVo.setRows(page1.getList());
        return pageVo;
    }

    @Override
    public MApply queryMApplyByName(MApply mApply) {
        return psmanageMapper.queryMApplyByName(mApply);
    }

    @Override
    public int updateMApplyByCheckTag(String applyId) {
        return psmanageMapper.updateMApplyByCheckTag(applyId);
    }


}
